From 39c3a03dfa4163c4b22e7175acab17b2d84e666c Mon Sep 17 00:00:00 2001 From: "acnt2@huggins.lce.cl.cam.ac.uk" Date: Thu, 5 Oct 2006 17:29:19 +0100 Subject: [PATCH] [XEND] Fix backslash escaping so it ignores escapes if they don't make sense. Signed-off-by: Alastair Tse --- tools/python/xen/xend/sxp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/sxp.py b/tools/python/xen/xend/sxp.py index e37adfb119..9cc8fc9731 100644 --- a/tools/python/xen/xend/sxp.py +++ b/tools/python/xen/xend/sxp.py @@ -267,10 +267,13 @@ class Parser: elif c == 'x': self.state.fn = self.state_hex self.state.val = 0 - else: + elif c == '0': self.state.fn = self.state_octal self.state.val = 0 self.input_char(c) + else: + # ignore escape if it doesn't match anything we know + self.pop_state() def state_octal(self, c): def octaldigit(c): -- 2.30.2